package com.luzhikun.Listener.servletContextListener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * @Author Rookie Coder
 * @Description 八大组件之ServletContextListener
 * @Date
 **/
public class ServletContextListner implements ServletContextListener {

    //当ServletContext被创建时会触发

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("ServletContext被创建");
    }

    //当ServletContext被销毁时会触发
    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("ServletContext被销毁");
    }
}
